1. Field of the Invention
The present invention relates to communications between computer applications. More specifically, the present invention relates to a method and an apparatus to facilitate accessing communication queues using a public network.
2. Related Art
Computer applications executing on a computing system often need to communicate with other computer applications executing on other computing systems. One method of communicating between these computer applications is to establish a direct link between the computer systems. Establishing direct links from one application to another, however, is impractical because of the amount of resources required and because these computer applications may not be executing at the same time.
Another method of communicating between computer applications is to use message queues. When using message queues, a client—a computer application executing on a computing system—can send a message to a queue or to a list of intended recipients, receive a message from a queue, and can register to be notified of messages in the queue.
FIG. 1 illustrates a number of computer systems coupled together, including clients 102, 104, 106, and database servers 108 and 110. Clients 102, 104, 106, and database servers 108 and 110 can generally include any type of computer system, including, but not limited to, a computer system based on a microprocessor, a mainframe computer, a digital signal processor, a portable computing device, a personal organizer, a device controller, and a computational engine within an appliance.
Database servers 108 and 110 include databases 112 and 114, respectively, and databases 112 and 114 include queues 116 and 118, respectively. Databases 112 and 114 can include any type of system for storing data in non-volatile storage. This includes, but is not limited to, systems based upon magnetic, optical, and magneto-optical storage devices, as well as storage devices based on flash memory and/or battery-backed up memory.
Clients 102 and 104 are coupled to database server 108 across communication links or networks using a database specific language such as procedural language/structured query language (PL/SQL) or Oracle® Call Interface (OCI) from Oracle® Corporation. Oracle® is a trademark or registered trademark of Oracle® Corporation in the United States of America and other countries. Client 106 is coupled to database server 110 across a communication link using the same database specific language. Additionally, database server 108 is coupled to database server 110 across a communication link also using the same database specific language.
During operation, a client, say client 102, wishing to communicate with another client, say client 104, generates a message and sends it to a database server, in this case, database server 108. Upon receiving this message, database server 108 puts the message in queue 116 within database 112. Database server 108 then notifies client 104, assuming that client 104 has registered with queue 116, that the message is available. Client 104 then retrieves the message from queue 116 by sending a receive, or dequeue, message to database server 108. Client 102 can also send a list of recipients for the message to database server 108. In this case, all of the recipients are notified that the message is available and they can all retrieve the message.
In another scenario, client 102 may wish to communicate with client 106. Client 102 generates the message, addresses the message to client 106, and sends it to database server 108. Database server 108 puts the message in queue 116 as before. This time, however, since the recipient is on a remote database, database server 108 propagates the message from queue 116 to database server 110. Database server 110 places the message in queue 1 18 within database 114. Assuming that client 106 has registered with queue 118, database server 110 notifies client 106 that the message is available. Client 106 then retrieves the message.
While message queues provide an efficient method to communicate asynchronously between executing applications on different clients, this method has a major disadvantage. Database servers 108 and 110 use a database specific language such as PL/SQL and messages using the database specific format are not compatible with message formats of databases that use different database specific languages. Additionally, these messages are not compatible with message formats used on the Internet. Also, there is no established mechanism to pass these messages through firewalls that are placed between a corporate intranet and the Internet.
What is needed is a method and an apparatus, which allows clients and databases to propagate messages from one queue to another queue with “exactly once” and “transactional” guarantees and to access the messages within these queues, both propagating and accessing these messages over a public network such as the Internet.